home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Moscow ML 1.42 / src / test / testcon.sml < prev    next >
Encoding:
Text File  |  1997-08-18  |  972 b   |  47 lines  |  [TEXT/R*ch]

  1. (* Rebinding and respecification as constructors of the identifiers
  2.  *    true, false, it, nil, ::, ref 
  3.  * is no longer permitted. 
  4.  *)
  5.  
  6. datatype t = true;
  7. datatype t = false;
  8. datatype t = it;
  9. datatype t = nil;
  10. datatype t = op ::;
  11. datatype t = ref;
  12.  
  13. datatype t = true of int;
  14. datatype t = false of int;
  15. datatype t = it of int;
  16. datatype t = nil of int;
  17. datatype t = op :: of int;
  18. datatype t = ref of int; 
  19.  
  20. exception true;
  21. exception false;
  22. exception it;
  23. exception nil;
  24. exception op ::;
  25. exception ref;
  26.  
  27. exception true = Div;
  28. exception false = Div;
  29. exception it = Div;
  30. exception nil = Div;
  31. exception op :: = Div;
  32. exception ref = Div;
  33.  
  34. exception true of int;
  35. exception false of int;
  36. exception it of int;
  37. exception nil of int;
  38. exception op :: of int;
  39. exception ref of int; 
  40.  
  41. abstype t = true of int with end;
  42. abstype t = false of int with end;
  43. abstype t = it of int with end;
  44. abstype t = nil of int with end;
  45. abstype t = op :: of int with end;
  46. abstype t = ref of int with end;  
  47.